package com.examplemartin.jpademo.pojo.po.stock;

import com.examplemartin.jpademo.pojo.admin.BaseEntity;
import com.examplemartin.jpademo.pojo.po.good.GoodPO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import java.io.Serializable;

/**
 * 库存信息实体
 */

@Data
@EqualsAndHashCode(callSuper = true)
@Entity(name = "t_SummGoodStock")
public class SummGoodPO  extends BaseEntity implements Serializable {


    // 商品  one
  @ManyToOne
  @JoinColumn(nullable = true)
  @NotFound(action= NotFoundAction.IGNORE)
  private GoodPO goodPO;


  // 库存
  private Integer goodcount=0;

  //备货数量
  private  Integer goodspare=0;


}
